import { requestCategoryList } from "@/api"

// vuex的home模块配置
const state={
    categoryList:[]
}
const mutations ={
    SET_CATEGORYLIST_STATE(state,value){
        state.categoryList=value
    }
}
const actions = {
    //异步发送三级列表数据请求
    async getCategoryList({commit}){
        const result = await requestCategoryList()
        commit('SET_CATEGORYLIST_STATE',result)
    }
}
const getters = {

} 
export default {
    namespaced:true,
    state,
    mutations,
    actions,
    getters
}